﻿using AppService.IService.System_operation;
using Domain.Entity.System_dictionary;
using Domain.Entity.System_operation;
using Domain.Entity.System_Ordermanagement;
using Domain.IRepository.System_operation;
using Domain.IRepository.System_Order;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;

namespace AppService.Service.System_operation
{
    [Dependency(ServiceLifetime.Scoped)]
    public class Wb_meterService : IWb_meterService
    {
        private readonly IWb_meterRepository wb_meterRepository;

        public Wb_meterService(IWb_meterRepository wb_meterRepository)
        {
            this.wb_meterRepository = wb_meterRepository;
        }

        public bool Add_Bill_ol(Bill_ol bill_Ol)
        {
            return wb_meterRepository.Add_Bill_ol(bill_Ol) > 0;
        }

        public int Count(string Origin_place, string Det_place, string tran_manager, string Wb_number)
        {
            return wb_meterRepository.Count(Origin_place, Det_place, tran_manager, Wb_number);
        }

        public int Count_status(string wb_status)
        {
            return wb_meterRepository.Count_status(wb_status);
        }

        public bool Delete(int Wb_id)
        {
            return wb_meterRepository.Delete(Wb_id) > 0;
        }

        public List<Orders> GetOrders(int Ord_id)
        {
            return wb_meterRepository.GetOrders(Ord_id);
        }

        public List<Wb_meter> GetWb_meter(int currentPage, int PageSize)
        {
            return wb_meterRepository.GetWb_meter(currentPage, PageSize);
        }

        public List<Wb_meter> GetWb_Meters(string Origin_place, string Det_place, string tran_manager, string Wb_number, int currentPage, int PageSize)
        {
            return wb_meterRepository.GetWb_Meters(Origin_place, Det_place, tran_manager, Wb_number, currentPage, PageSize);
        }

        public List<Wb_meter> GetWb_Meters_status(string wb_status, int currentPage, int PageSize)
        {
            return wb_meterRepository.GetWb_Meters_status(wb_status, currentPage, PageSize);
        }

        public List<Wb_meter> GetWb_Meters_wb_id(int Wb_id)
        {
            return wb_meterRepository.GetWb_Meters_wb_id(Wb_id);
        }

        public List<Sys_dict_data> Get_Dict_Datas(string Dict_label)
        {
            return wb_meterRepository.Get_Dict_Datas(Dict_label);
        }

        public bool Update(Wb_meter wb_Meter)
        {
            return wb_meterRepository.Update(wb_Meter) > 0;
        }

        public bool Update_status(int Wb_id)
        {
            return wb_meterRepository.Update_status(Wb_id) > 0;
        }
    }
}
